/**
 * 功能描述
 */
define(function (require, exports, module) {
	var Component = require("subnav");
	var user = require("store").get("user");
	
    var instance = {
        initComponent: function (params, widget) {
            var component = new Component({
            	parentNode:".J-subnav",
				model : {
					title:"当日房态统计",
					items : [{
					      id :"servicePoint",
					      type : "buttongroup",
					      all : {
					    	  show:false,
					    	  first:true
					      },
//					      lazy:true,
					      tip : "服务点",
					      keyField :"pkServicePoint",
					      valueField : "name",
					      items:user.privateServicePoints,
//					      url : "api/servicepoint/operableservicepoints",
					      params : function(){
					    	  return{
					    		  fetchProperties:"pkServicePoint,name"
					    	  }
					      },
					      handler : function(key,element){
					    	  widget.get("grid").refresh();
					      }
				    },{
			            id: "createDate",
			            type: "date",
			            tip : "入住时间",
			            handler: function(start, end) {
			            	widget.get("grid").refresh();
			            }
					}]
				}
            });
            widget.set("subnav", component);
        }
    };
    module.exports = instance;
});
